package com.ieheima.controller.utils;

import lombok.Data;

//统一表现层的数据格式，便于前端开发读取数据（称为前后端的数据协议）
@Data
public class R {
    private Boolean flag;
    //数据
    private Object data;
    private String msg;

    public R() {
    }

    public R(Boolean flag) {

        this.flag = flag;
    }

    public R(Boolean flag, Object data) {
        this.flag = flag;
        this.data = data;
    }

    public R(Boolean flag, String msg) {
        this.flag = flag;
        this.msg = msg;
    }

    public R(String msg) {
        this.flag = false;
        this.msg = msg;
    }
}
